z[_-.RODBC_Excel: "[<-" method for MS Excel files. Write data in a MS Excel...

Description Usage Arguments Author(s) See Also

Description

"[<-" method for MS Excel files. Write data in a table in a

MS Excel file (referenced by 'edb').

Usage

1
2
## S3 replacement method for class 'RODBC_Excel'
edb[tableName, mode = "a", pKey = NULL, getKey = NULL, formatCol = NULL, posixFormat = "", dateFormat = "", parano = TRUE, verbose = FALSE, ...] <- value

Arguments

edb

An object of class 'edb', such as returned by edb.

tableName

Single character string. Name of the table to read in 'edb'.

mode

Single character string. If "a" (default), the data are

appened to the table (added after the last row), and sRow

is ignored. If "u", the data are updated according to some

critearia in sRow (that can't be NULL). If "o",

the table is overwritten and sRow is ignored.

pKey

Single character string (if mode == "u") or NULL. Column name that

is PRIMARY KEY in the table.

getKey

Single character string or NULL. If non NULL, name of the PRIMARY

KEY whose latest attributed values should be retrieved. NOT

usable with Excel. Will produce a warning message if non NULL.

formatCol

If not NULL, a named list of functions to be applied to certain columns

before the data are written to the database. The name of each list

item gives the column to process, and the value of each item gives the

function that must be applied. For instance

formatCol = list("DATE"=as.Date) will apply the function

as.Date to the column "DATE".

posixFormat

Single character string. 'format' argument of the functions

format.POSIXlt() or format.POSIXct() used to convert POSIX

date-time into character strings when writing into the database.

Only used if getKey is not NULL.

dateFormat

Single character string. 'format' argument of the functions

format.Date() used to convert "Date"

dates into character strings when writing into the database.

Only used if getKey is not NULL.

parano

Single logical. If set to TRUE (the default), the function is

run on "paranoia mode", that is additional tests are performed

before the data are written into the database. This slows down

a bit (more) the function, but it may avoid some mistakes.

verbose

Single logical. If TRUE, information on what is done are output

on screen.

...

Additional parameters to be passed to class-specific method. See

methods("edbWrite")

value

data.frame. Data to be writen in tableName. If sRow

is not NULL, then data must contain the column names given in

sRow.

Author(s)

Julien MOEYS <Julien.Moeys@mark.slu.se>

See Also

edb, edbWrite.RODBC_Excel,

edbRead.RODBC_Excel.


easyrodbcexcel documentation built on May 2, 2019, 6:12 p.m.